#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int x;

int judge(int a, int b, int c)
{
    if ((x - a) * (x - a) + (x - b) * (x - b) == c * c)
        return 1;
    return 0;
}

int main()
{
    int m, n;
    scanf("%d", &x);
    scanf("%d,%d", &n, &m);
    for (int i = n; i <= m; i++)
    {
        for (int j = n; j <= m; j++)
        {
            for (int k = n; k <= m; k++)
                if (judge(i, j, k))
                    printf("%d,%d,%d\n", i, j, k);
        }
    }
    return 0;
}